Compositional Mining of Multiple Object API Protocols through State Abstraction

نویسندگان

  • Ziying Dai
  • Xiaoguang Mao
  • Yan Lei
  • Yuhua Qi
  • Rui Wang
  • Bin Gu
چکیده

API protocols specify correct sequences of method invocations. Despite their usefulness, API protocols are often unavailable in practice because writing them is cumbersome and error prone. Multiple object API protocols are more expressive than single object API protocols. However, the huge number of objects of typical object-oriented programs poses a major challenge to the automatic mining of multiple object API protocols: besides maintaining scalability, it is important to capture various object interactions. Current approaches utilize various heuristics to focus on small sets of methods. In this paper, we present a general, scalable, multiple object API protocols mining approach that can capture all object interactions. Our approach uses abstract field values to label object states during the mining process. We first mine single object typestates as finite state automata whose transitions are annotated with states of interacting objects before and after the execution of the corresponding method and then construct multiple object API protocols by composing these annotated single object typestates. We implement our approach for Java and evaluate it through a series of experiments.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

API Protocol Compliance in Object-Oriented Software

Modern software development is highly reliant on reusable APIs. APIs often define usage protocols that API clients must follow in order for code implementing the API to work correctly. Loosely speaking, API protocols define legal sequences of method calls on objects. In this work, protocols are defined based on typestates (Strom and Yemini, 1986; DeLine and Fähndrich, 2004b). Typestates leverag...

متن کامل

Extracting More Object Usage Scenarios for API Protocol Mining

Automatic protocol mining is a promising approach to infer precise and complete API protocols. However, the effect of the approach largely depends upon the quality of input object usage scenarios, in terms of noise and diversity. This paper aims to extract as many object usage scenarios as possible from object-oriented programs for automatic protocol mining. A large corpus of object usage scena...

متن کامل

Distributed API Protocol Mining

Dynamic Protocol Mining (DPM) techniques are a promising approach to infer useful API protocols automatically. However, their results are biased to input test cases and the instrumentation overhead discounts their usability in industrial practice. In this paper, we propose a distributed dynamic protocol mining framework NSpecMiner. Our framework is based on a client-server architecture, where t...

متن کامل

Abstracting Low-Level Network Programming with ACE, A Pattern-Oriented Network Programming Framework

ing Low-Level Network Programming With ACE, a Pattern-Oriented Network Programming Framework Michael LeMay Jack Tan Computer Sci. Department Computer Sci. Department UW-Eau Claire UW-Eau Claire 2316 80th St. 105 Garfield Ave. Box 4004 Eau Claire, WI 54703 Eau Claire, WI 54702 [email protected] [email protected] Phone: (715)832-9951 Phone: (715)836-2526 Fax: (715)836-2923 Fax: (715)836-2923 Presente...

متن کامل

Mining API Usage Patterns by Applying Method Categorization to Improve Code Completion

Developers often face difficulties while using APIs. API usage patterns can aid them in using APIs efficiently, which are extracted from source code stored in software repositories. Previous approaches have mined repositories to extract API usage patterns by simply applying data mining techniques to the collection of method invocations of API objects. In these approaches, respective functional ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره 2013  شماره 

صفحات  -

تاریخ انتشار 2013